package DesignPatern.A18_备忘录模式.A03_高级模式;

/**
 * @Author: Du
 * @Date: 2021/8/6 15:00
 */
public class Document
{
    private String context;
    
    public BackUp save()
    {
        return new BackUp(context);
    }
    
    public void resume(BackUp backUp)
    {
        context = backUp.context;
    }
    
    public void change(String context)
    {
        this.context = context;
    }
    
    public void print()
    {
        System.out.println(context);
    }
    
}
